import {SceneClass} from "./base-class/SceneClass";
import {CommonClass} from "./base-class/CommonClass";
import {CommonController} from "./base-class/CommonController";
import {ConstVariable} from "./support/ConstVariable";
import {initSwarm} from "./swarm";
import {Midware} from "./midware";
import {stringPolyFill} from "../polyfill/StringPolyFill";
import {typescriptPolyFill} from "../polyfill/TypescriptPolyFill";
import {arrayPolyFill} from "../polyfill/ArrayPolyFill";
import {BaseService} from "./service-class/BaseService";

(function (self) {
    typescriptPolyFill();
    arrayPolyFill();
    stringPolyFill();
    //Set export class
    if(!self.Midware) self.Midware = Midware;
    if(!self.ConstVariable) self.ConstVariable = self.Midware.ConstVariable = ConstVariable;
    if(!self.CommonClass) self.CommonClass = self.Midware.CommonClass = CommonClass;
    if(!self.SceneClass) self.SceneClass = self.Midware.SceneClass = SceneClass;
    if(!self.CommonController) self.CommonController = self.Midware.CommonController = CommonController;
    if(!self.CommonService) self.CommonService = self.Midware.CommonService = BaseService;
    //初始化组件库
    initSwarm();

})(typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : this);